home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15607 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: nntp.teleport.com!usenet
  2. From: GHouck <hksys@teleport.com>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: SCANF and FSCANF
  5. Date: 20 Apr 1996 08:26:50 GMT
  6. Organization: systems hk
  7. Message-ID: <4la74a$7tq@nadine.teleport.com>
  8. References: <4l61li$bu7@abel.cc.sunysb.edu>
  9. NNTP-Posting-Host: ip-pdx03-45.teleport.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.22 (Windows; I; 32bit)
  14.  
  15. dkat@psych1.psy.sunysb.edu (DK) wrote:
  16. >Ok, this is driving me nuts.  Why do I keeps seeing references to the
  17. >use of SCANF and FSCANF?  Why would anyone use them or recommend their
  18. >use?  Yes it saves one line of code but I see more people running into
  19. >problems they could easily avoid just by using gets and fgets followed
  20. >with sscanf and doing it consistently  (Mixing gets, fgets, scanf, and
  21. >fscanf is another problem in itself)!  Am I missing something?
  22. >
  23.  
  24. I, for one, am sometimes (often?) lazy.  Depends on how many lines of
  25. code I am interested in writing, and how long the program is going to
  26. last in this world, and how robust it needs to be.  Nothing more.
  27. Nothing less.  Kind of like: why would anybody use a bubble sort?
  28. Because it works under the right circumstances.  So do scanf and fscanf.
  29.  
  30. Yours, Geoff Houck
  31.  
  32.